//
//  XLGHTTPManagerService.h
//  etionCBLogic
//
//  Created by wjxfhxy on 14-2-16.
//  Copyright (c) 2014年 GuangZhouXuanWu. All rights reserved.
//

#import "XLGManagerService.h"

#import "XLGHTTPMethodType.h"

#import "XLGResult.h"

@interface XLGHTTPManagerService : XLGManagerService

//废弃方法
-(void)HTTPRESTRequestURI:(NSString*)URI extendHeadField:(NSDictionary*)headField dicData:(NSDictionary*)dic HTTPMethod:(XLGHTTPMethodType)nMethod completion:(void(^)(NSInteger nResult,id output,NSError *error))completion;

/**
 *  发起HTTP请求
 *
 *  @param URI       URI资源
 *  @param headField 额外请求头
 *  @param dic       请求参数
 *  @param nMethod   请求方式
 *
 */
-(XLGResult*)HTTPRESTRequestURI:(NSString*)URI extendHeadField:(NSDictionary*)headField dicData:(NSDictionary*)dic HTTPMethod:(XLGHTTPMethodType)nMethod;

//废弃方法
-(void)HTTPRESTRequestURI:(NSString*)URI dicData:(NSDictionary*)dic HTTPMethod:(XLGHTTPMethodType)nMethod completion:(void(^)(NSInteger nResult,id output,NSError *error))completion;

/**
 *  发起HTTP请求
 *
 *  @param URI       URI资源
 *  @param dic       请求参数
 *  @param nMethod   请求方式
 *
 */
-(XLGResult*)HTTPRESTRequestURI:(NSString*)URI dicData:(NSDictionary*)dic HTTPMethod:(XLGHTTPMethodType)nMethod;

//-(void)HTTPRESTRequestURI:(NSString*)URI requestKeyObj:(NSDictionary*)requestKeyObj objTransBlock:(void(NSString *key,id obj,id transObj))block HTTPMethod:(XLGHTTPMethodType)nMethod complete:(void(^)(NSInteger nResult,id output,NSError *error))complete;

//-(void)HTTPRESTRequestURI:(NSString*)URI requestKeyObj:(NSDictionary*)requestKeyObj HTTPMethod:(XLGHTTPMethodType)nMethod complete:(void(^)(NSInteger nResult,id output,NSError *error))complete;

/**
 *  对请求URL连接进行二次处理
 */
+(void)operateNeedTransferURLBlock:(NSString*(^)(NSString *URL))transferURL;

//extend
-(void)HTTPRESTRequestURI:(NSString*)URI protocol:(EProtocolTransformType)protocol dicData:(NSDictionary*)dic HTTPMethod:(XLGHTTPMethodType)nMethod completion:(void(^)(NSInteger nResult,id output,NSError *error))completion;
@end
